<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
 	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  	<title>${SYSTEM_NAME}</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/layui/css/layui.css?v=${FILE_VERSION}" media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/style/admin.css?v=${FILE_VERSION}" media="all">
  	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/js/zTree_v3/css/metroStyle/metroStyle.css?v=${FILE_VERSION}" type="text/css">
</head>
<body>
<div style="border: 1px solid #ccc;" >
	<input id="queryTop" value="${queryTop}" type="hidden">
 	<ul id="treeRegion" class="ztree"></ul>
 </div>

<script src="${pageContext.request.contextPath}/static/js/common-2.0.0.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/layuiadmin/layui/layui.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.min.js?v=${FILE_VERSION}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/zTree_v3/js/jquery.ztree.core.js?v=${FILE_VERSION}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/zTree_v3/js/jquery.ztree.excheck.js?v=${FILE_VERSION}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/common/commOrgTree.js?v=${FILE_VERSION}"></script>
<script>
var layer;
layui.config({
	base: getContextPath() + '/static/layuiadmin/' //静态资源所在路径
}).extend({
	index: 'lib/index' //主入口模块
}).use(['layer'], function(){
	layer = layui.layer;
	//创建树结构
	createOrgTree($("#queryTop").val(),"/sys/org/list/listAllTree",false);
});

function orgTreeClickCallback(node){
	parentName = node.name;
	parent.setOrg(node.id, node.name, node.type);
	closed();
}

function closed(){
	var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
	parent.layer.close(index);//关闭弹出的子页面窗口
}
</script>
</body>
</html>